package cn.tedu.sp04.order.service;

import cn.tedu.sp01.pojo.Order;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class OrderServiceImpl implements cn.tedu.sp01.service.OrderService {

    //根据orderId获取订单
    @Override
    public Order getOrder(String orderId) {

        //写死订单数据
        Order order = new Order();
        order.setId(orderId);

        return order;
    }

    //保存订单
    @Override
    public void addOrder(Order order) {

        log.info("保存订单： "+ order);

        //TODO: 远程调用善品服务，减少商品库存
        //TODO: 远程调用用户服务，增加用户积分

    }
}
